package com.jiao.store.controller;


import com.jiao.store.entity.Districts;
import com.jiao.store.service.DistrictsService;
import com.jiao.store.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("districts")
public class DistrictsController extends  BaseController{

     @Autowired
    private DistrictsService districtsService;

    @RequestMapping("/show")
    public JsonResult<List<Districts>>  getParent(String parent){
        List<Districts> data = districtsService.getParent(parent);

        return  new JsonResult<>(Ok,data);
    }


}
